<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

  <title>该页面不存在</title>
  <link rel="shortcut icon" href="">
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      color: #F1F1F1;
    }

    body {
      font-family: Verdana, Geneva, Tahoma, sans-serif;
      background: rgb(238, 174, 202);
      background: radial-gradient(circle, rgba(238, 174, 202, 1) 0%, rgba(148, 187, 233, 1) 100%);
    }

    .container {
      height: 100vh;
      width: 80vw;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      text-align: center;
    }

    .container .num {
      font-size: 8rem;
      margin-bottom: 40px;
    }

    .container .stg {
      font-size: 3rem;
      margin-bottom: 40px;
      display: none;
      animation: .7s ease-in-out show;
    }

    @keyframes show {
      0% {
        opacity: 0;
      }
      100% {
        opacity: 1;
      }
    }
  </style>
</head>
<body>
<!-- partial:index.partial.html -->
<div class="container">
  <div class="display">
    <h1 class="num">404</h1>
    <h1 class="stg" style="display: block;">呀!这个页面走丢了</h1>
  </div>
</div>
<!-- partial -->
<script>
  // Declare the Elements
  const dispNum = document.querySelector(".display .num");
  const dispErr = document.querySelector(".container .stg");


  window.onload = function () {

    function showNum() {
      const randomNum = Math.floor(Math.random() * 1000);
      const randomStr = randomNum.toString()

      dispNum.textContent = randomStr
    }

    var interval = setInterval(showNum, 500);

    setTimeout(() => {
      clearInterval(interval);

      dispNum.textContent = "404";
      dispErr.style.display = "block";
      dispErr.textContent = "呀!这个页面走丢了"
    }, 4000);
  }
</script>

</body>
</html>